package com.centronix.domain;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.List;


/**
 * The persistent class for the business_partner database table.
 * 
 */
@Entity
@Table(name="business_partner")
public class BusinessPartner implements Serializable {
	private static final long serialVersionUID = 1L;
	private int businessPartnerId;
	private BigDecimal creditBal;
	private Person person;
	private List<Receipt> receipts;

    public BusinessPartner() {
    }


	@Id
	public int getBusinessPartnerId() {
		return this.businessPartnerId;
	}

	public void setBusinessPartnerId(int businessPartnerId) {
		this.businessPartnerId = businessPartnerId;
	}


	public BigDecimal getCreditBal() {
		return this.creditBal;
	}

	public void setCreditBal(BigDecimal creditBal) {
		this.creditBal = creditBal;
	}


	//bi-directional many-to-one association to Person
    @ManyToOne
	@JoinColumn(name="PersonId")
	public Person getPerson() {
		return this.person;
	}

	public void setPerson(Person person) {
		this.person = person;
	}
	

	//bi-directional many-to-one association to Receipt
	@OneToMany(mappedBy="businessPartner")
	public List<Receipt> getReceipts() {
		return this.receipts;
	}

	public void setReceipts(List<Receipt> receipts) {
		this.receipts = receipts;
	}
	
}